package landun.service.impl;

import landun.dao.EmpDao;
import landun.pojo.SysEmployee;
import landun.service.EmpService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service("empService")
public class EmpServiceImpl implements EmpService {

    @Resource
    public EmpDao empDao;

    @Override
    public SysEmployee findByName(String name) {
        return empDao.findByName(name);
    }

    @Override
    public SysEmployee findByPosition(Integer positionId, Integer deptId) {
        return empDao.findByPosition(positionId,deptId);
    }

    @Override
    public void delete(SysEmployee sysEmployee) {
        empDao.delete(sysEmployee);
    }

    @Override
    public void addEmp(SysEmployee sysEmployee) {
        empDao.save(sysEmployee);
    }
}
